LIBC_VER  = $(shell ls /lib/libc-*.so | cut -c11-13)  

CPP_FILE = *.cpp ./FrameAPI/*.cpp
INC_FILE = -I./ -I./FrameAPI/
TAR_FILE = ../bin/testBServer.so

INC_TOOL   = 
LNK_TOOL   = 
  
INC_MYSQL  = 
LNK_MYSQL  = 
  
INC = $(INC_TOOL) $(INC_MYSQL) $(INC_FILE)
LNK = $(LNK_TOOL) $(LNK_MYSQL) 

CPP = $(wildcard $(CPP_FILE))
OBJ = $(patsubst %.cpp,%.o,$(CPP)) 
LINK_OBJ = $(patsubst %.cpp,%.o,$(notdir $(CPP)))
  
all: $(TAR_FILE)  
  
$(TAR_FILE): $(OBJ)  
	@g++ -shared -g -o $@ $(LINK_OBJ) $(INC) $(LNK)  
	@echo $@  
	rm -f *.o  
  
%.o: %.cpp  
	@g++ -Wall -fPIC -g -c $*.cpp $(INC)  
	@echo $@  
  
clean:   
	rm -f *.o  
	rm $(TAR_FILE)
